package vn.com.baseapplication.constant;

import java.util.HashMap;

public final class IndexFactory {
	private static IndexFactory instance = new IndexFactory();
	
	long currentIndex = 0;
	HashMap<Long, String> mapIndex = new HashMap<>();
	private IndexFactory() {
		
	}
	
	public static IndexFactory getInstance(){
		return instance;
	}
	
	public long generate(String description){
		mapIndex.put(currentIndex++, description);
		return currentIndex-1;
	}
	
}
